import { nextTick } from "vue"
import Form from "./Form"
import FormElement from "./FormElement"

export default abstract class BaseForm extends Form {
    element: FormElement = {}
    createBy = ''
    createTime = ''
    updateBy = ''
    updateTime = ''

    resetFields() {
        nextTick(() => {
            const ref = this.getRef()
            ref.resetFields()
        })
    }

    clearValidate() {
        nextTick(() => {
            const ref = this.getRef()
            ref.clearValidate()
        })
    }
}
